##!/usr/bin/env python
<%page args="shot, page"/>
<%
import os
from pygolem_lite.web import cat, emph, get_page_paths
page_path, base_path, page = get_page_paths(shot, page)
youtube = "tomography/youtube_url"
correct = False
tomo="tomography/"
from pygolem_lite import Shot
Data = Shot(shot)
%>
<?php
if (file_exists('tomography')) {
?>
<h2> Basic analysis </h2>
<img src='tomography/power.png'><br/>
<img src='tomography/xmass.png'><br/>
<img src='tomography/ymass.png'><br/>
<h2>Singular value decomposition</h2>
<img src='tomography/SVD.png'><br/>
<?php }
if ( ! file_exists('tomo_working') ) {
$plasma = ${Shot(shot)['plasma']};
if ( $plasma == 1 ) {
echo '<h2> Tomography not accessible</h2>';
} else {
echo '<h2>No plasma</h2>';
}
}
if ( file_exists('tomo_working') && ! file_exists('tomography/')) {
echo '<h2> Computing tomography, wait .... (max 10 min.)</h2>';
}
?>